package com.linwancun.lwcyback.service;

import com.linwancun.lwcyback.mapper.ManagerMapper;
import com.linwancun.lwcyback.model.Manager;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ManagerServiceImp implements ManagerService {
    @Resource
    ManagerMapper managerMapper;

    @Override
    public void insert(Manager object) {
        managerMapper.insert(object);
    }

    @Override
    public List<Manager> getAll() {
        return managerMapper.list(new Manager());
    }

    @Override
    public void save(Manager object) {
        managerMapper.updateByPrimaryKey(object);
    }

    @Override
    public Manager find(Manager object) {
        return managerMapper.find(object);
    }

    @Override
    public void delete(Manager object) {
        managerMapper.deleteByPrimaryKey(object.getManagerid());
    }

    @Override
    public List<Manager> getList(Manager object) {
        return managerMapper.list(object);
    }
}
